﻿
namespace FileSynchronizer.Objects
{
    public enum SyncStatusErrors
    {
        None,
        PathNotAccessible
    }

    public class SyncStatus
    {
        #region Private variables
        //---------------------------------------------------------------------------------------------------------------------------------------
        private int myFilesCreatedCount;
        private int myFilesDeletedCount;
        private int myFilesRenamedCount;
        private int myFilesUpdatedCount;

        private SyncStatusErrors myErrorStatus;
        //---------------------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Constructors
        //---------------------------------------------------------------------------------------------------------------------------------------
        public SyncStatus()
        {
            myFilesCreatedCount = 0;
            myFilesDeletedCount = 0;
            myFilesRenamedCount = 0;
            myFilesUpdatedCount = 0;

            myErrorStatus = SyncStatusErrors.None;
        }
        //---------------------------------------------------------------------------------------------------------------------------------------
        #endregion

        #region Public variables and properties
        //---------------------------------------------------------------------------------------------------------------------------------------
        public int FilesCreatedCount
        {
            get
            {
                return myFilesCreatedCount;
            }
            set
            {
                myFilesCreatedCount = value;
            }
        }

        public int FilesDeletedCount
        {
            get
            {
                return myFilesDeletedCount;
            }
            set
            {
                myFilesDeletedCount = value;
            }
        }

        public int FilesRenamedCount
        {
            get
            {
                return myFilesRenamedCount;
            }
            set
            {
                myFilesRenamedCount = value;
            }
        }

        public int FilesUpdatedCount
        {
            get
            {
                return myFilesUpdatedCount;
            }
            set
            {
                myFilesUpdatedCount = value;
            }
        }

        public SyncStatusErrors ErrorStatus
        {
            get
            {
                return myErrorStatus;
            }
            set
            {
                myErrorStatus = value;
            }
        }

        public void AddFileCreated()
        {
            myFilesCreatedCount++;
        }

        public void AddFileDeleted()
        {
            myFilesDeletedCount++;
        }

        public void AddFileRenamed()
        {
            myFilesRenamedCount++;
        }

        public void AddFileUpdated()
        {
            myFilesUpdatedCount++;
        }
        //---------------------------------------------------------------------------------------------------------------------------------------
        #endregion

    }
}
